﻿using SqlSugar;

namespace PMIS.WebApi.Model
{
    [SugarTable("sys_dept", TableDescription = "部门")]
    public class Department: BaseModel
    {
        [SugarColumn(ColumnDescription = "ID", Length = 30, IsPrimaryKey = true)]
        public string Id { get; set; }

        [SugarColumn(ColumnDescription = "父id", IsNullable = true)]
        public string? ParentId { get; set; }

        [SugarColumn(ColumnDescription = "部门名称", Length = 50)]
        public string Name { get; set; }

        [SugarColumn(ColumnDescription = "部门负责人", IsNullable = true)]
        public int? PrincipalId { get; set; }

        [SugarColumn(ColumnDescription = "部门负责人名字", IsIgnore = true)]
        public string PrincipalName { get; set; }

        [SugarColumn(ColumnDescription = "排序", IsNullable = true)]
        public int? Sort { get; set; } = 1;

        [SugarColumn(ColumnDescription = "备注", IsNullable = true)]
        public string Remark { get; set; }

    }
}
